//
//  Contact.m
//  通讯录-02
//
//  Created by 伍银荣 on 2021/6/29.
//  Copyright © 2021 com.example. All rights reserved.
//

#import "Contact.h"

@implementation Contact

-(void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.number forKey:@"number"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.number = [aDecoder decodeObjectForKey:@"number"];
    }
    return self;
}

@end
